<template>
  <div>
      <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>活动管理</el-breadcrumb-item>
      <el-breadcrumb-item>活动列表</el-breadcrumb-item>
      <el-breadcrumb-item>活动详情</el-breadcrumb-item>
    </el-breadcrumb>
    <el-table :data="tableData" border style="margin-top: 30px">
      <el-table-column type="index" label="#" width="180"> </el-table-column>
      <el-table-column prop="authName" label="权限名称" width="180">
      </el-table-column>
      <el-table-column prop="path" label="路径"> </el-table-column>
      <el-table-column label="权限等级">
        <template slot-scope="scope">
          <el-tag type="success" v-if="scope.row.level==0">一级</el-tag>
          <el-tag type="info" v-if="scope.row.level==1">二级</el-tag>
          <el-tag type="warning" v-if="scope.row.level==2">三级</el-tag>
        </template>
      </el-table-column>
    </el-table>

    
  </div>
</template>


<script>
import { rightlist } from "@/http/api";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    this.getlist();
  },
  methods: {
    async getlist() {
      const res = await rightlist();
      console.log("权限", res);
      this.tableData = res;
    },
  },
};
</script>

<style lang="scss" scoped>
.el-breadcrumb {
  margin-top: 20px;
}
</style>